#include"EditRect.h"

/////////////////
//include
/////////////////
#include"Mouse.h"
/////////////////
//prottype
/////////////////

/////////////////
//const
/////////////////


EditRect::EditRect()
{

}
EditRect::~EditRect()
{

}
void EditRect::Init()
{
	is_drag_move	= false;
	is_drag_scale	= false;
}
void EditRect::ContentLoad()
{

}
void EditRect::Update()
{
	if(Mouse::IsClickingLeft())
	{
		if(move_rect.Collision(Mouse::GetPos().ChengeScreenPos()))
		{
			is_drag_move =true;
		}
		if(scale_rect.Collision(Mouse::GetPos().ChengeScreenPos()))
		{
			is_drag_scale =true;
		}
	}
	if(!Mouse::IsClickingLeft())
	{
		is_drag_move	= false;
		is_drag_scale	= false;
	}
	if(is_drag_move)
	{
		move_rect.SetPos(Mouse::GetPos().ChengeScreenPos());
	}
	if(is_drag_scale)
	{
		scale_rect.SetPos(Mouse::GetPos().ChengeScreenPos());
	}
}